package br.com.main.client.system.botoes;

import br.com.main.client.system.botoes.MeusDadosPresenter.Display;

import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.DecoratorPanel;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.VerticalPanel;

public class MeusDadosView extends Composite implements Display {

	private HorizontalPanel panel;
	private TextBox tbNome;
	private TextBox tbCpf;
	private TextBox tbLogin;
	private TextBox tbEmail;
	private TextBox tbTelefone;
	private TextBox tbData_nasc;
	private TextBox tbData_mandato;

	private TextBox tbCnpj;
	private TextBox tbCep;
	private TextBox tbEstado;
	private TextBox tbCidade;
	private TextBox tbBairro;
	private TextBox tbRua;
	private TextBox tbNumero;
	private TextBox tbComplemento;
	private Button btEditar;
	private Button btCancel;
	private Button btSalvar;

	public MeusDadosView() {
		init();
		initWidget(panel);
	}

	private void init() {

		panel = new HorizontalPanel();
		panel.setSpacing(20);
		panel.addStyleName("bordaDados");
		
		tbNome = new TextBox();
		tbCpf = new TextBox();
		tbCpf.setEnabled(false);
		tbLogin = new TextBox();
		tbEmail = new TextBox();
		tbTelefone = new TextBox();
		tbData_nasc = new TextBox();
		tbData_mandato = new TextBox();

		VerticalPanel painelSindico = new VerticalPanel();
		painelSindico.setBorderWidth(1);

		painelSindico.add(new Label("Informações do Síndico"));
		painelSindico.add(new Label("Nome"));
		painelSindico.add(tbNome);
		painelSindico.add(new Label("CPF"));
		painelSindico.add(tbCpf);
		painelSindico.add(new Label("Login"));
		painelSindico.add(tbLogin);
		painelSindico.add(new Label("Email"));
		painelSindico.add(tbEmail);
		painelSindico.add(new Label("Telefone"));
		painelSindico.add(tbTelefone);
		painelSindico.add(new Label("Data Nascimento"));
		painelSindico.add(tbData_nasc);
		painelSindico.add(new Label("Data Mandato"));
		painelSindico.add(tbData_mandato);

		tbCnpj = new TextBox();
		tbCnpj.setEnabled(false);
		tbCep = new TextBox();
		tbEstado = new TextBox();
		tbEstado.setMaxLength(2);
		tbEstado.setWidth("25px");
		tbCidade = new TextBox();
		tbBairro = new TextBox();
		tbRua = new TextBox();
		tbNumero = new TextBox();
		tbComplemento = new TextBox();

		VerticalPanel painelCondominio = new VerticalPanel();
		painelCondominio.setBorderWidth(1);
		
		painelCondominio.add(new Label("Informações do Condomínio"));
		painelCondominio.add(new Label("CNPJ"));
		painelCondominio.add(tbCnpj);
		painelCondominio.add(new Label("Cep"));
		painelCondominio.add(tbCep);
		painelCondominio.add(new Label("Estado"));
		painelCondominio.add(tbEstado);
		painelCondominio.add(new Label("Cidade"));
		painelCondominio.add(tbCidade);
		painelCondominio.add(new Label("Bairro"));
		painelCondominio.add(tbBairro);
		painelCondominio.add(new Label("Rua"));
		painelCondominio.add(tbRua);
		painelCondominio.add(new Label("Número"));
		painelCondominio.add(tbNumero);
		painelCondominio.add(new Label("Complemento"));
		painelCondominio.add(tbComplemento);
		painelCondominio.add(new Label(" "));

		HorizontalPanel panelBt = new HorizontalPanel();
		
		btEditar = new Button("Editar");
		btCancel = new Button("Cancelar");
		btSalvar = new Button("Salvar");
		btSalvar.setVisible(false);
		btCancel.setVisible(false);
		panelBt.add(btEditar);
		panelBt.add(btSalvar);
		panelBt.add(btCancel);
		panelBt.setSpacing(15);
		
		painelCondominio.add(panelBt);
		
		panel.add(painelSindico);
		panel.add(painelCondominio);
		
		DecoratorPanel todo = new DecoratorPanel();
		todo.add(panel);
	}
	@Override
	public Button getBtCancel() {
		return btCancel;
	}

	@Override
	public Button getBtEditar() {
		return btEditar;
	}
	@Override
	public Button getBtSalvar() {
		return btSalvar;
	}

	@Override
	public TextBox getTbNome() {
		return tbNome;
	}
	@Override
	public TextBox getTbCpf() {
		return tbCpf;
	}
	@Override
	public TextBox getTbLogin() {
		return tbLogin;
	}
	@Override
	public TextBox getTbEmail() {
		return tbEmail;
	}
	@Override
	public TextBox getTbTelefone() {
		return tbTelefone;
	}
	@Override
	public TextBox getTbData_nasc() {
		return tbData_nasc;
	}
	@Override
	public TextBox getTbData_mandato() {
		return tbData_mandato;
	}
	@Override
	public TextBox getTbCnpj() {
		return tbCnpj;
	}
	@Override
	public TextBox getTbCep() {
		return tbCep;
	}
	@Override
	public TextBox getTbEstado() {
		return tbEstado;
	}
	@Override
	public TextBox getTbCidade() {
		return tbCidade;
	}
	@Override
	public TextBox getTbBairro() {
		return tbBairro;
	}
	@Override
	public TextBox getTbRua() {
		return tbRua;
	}
	@Override
	public TextBox getTbNumero() {
		return tbNumero;
	}
	@Override
	public TextBox getTbComplemento() {
		return tbComplemento;
	}

	
}
